﻿@namespace BootstrapBlazor.Components
@inherits ButtonBase

<button @attributes="@AdditionalAttributes" @onclick="@OnClickButton" id="@Id" class="@ToggleClassName" disabled="@Disabled"
        role="button" data-bs-placement="@PlacementString" data-bs-trigger="@TriggerString"
        aria-disabled="@DisabledString" tabindex="@Tab" data-bs-toggle="button"
        @onclick:stopPropagation="@StopPropagation">
    @if(IsAsyncLoading)
    {
        <i class="@LoadingIcon"></i>
    }
    else if (!string.IsNullOrEmpty(Icon))
    {
        <i class="@Icon"></i>
    }
    @if (!string.IsNullOrEmpty(Text))
    {
        <span>@Text</span>
    }
    <CascadingValue Value="this" IsFixed="true">
        @ChildContent
    </CascadingValue>
</button>
